

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/stm/swstinputpassengerworkticket/page',
    method: 'get',
    params: query
  })
}

export function invalidList(query) {
  return request({
    url: '/stm/swstinputpassengerworkticket/pageLine',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/stm/swstinputpassengerworkticket',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/stm/swstinputpassengerworkticket/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/stm/swstinputpassengerworkticket/' + id,
    method: 'delete'
  })
}

export function batchDelete(ids) {
  return request({
    url: '/stm/swstinputpassengerworkticket/batchDelete',
    method: 'post',
    data: ids
  })
}

export function putObj(obj) {
  return request({
    url: '/stm/swstinputpassengerworkticket',
    method: 'put',
    data: obj
  })
}

export function submit(obj) {
  return request({
    url: '/stm/swstinputpassengerworkticket/submit',
    method: 'post',
    data: obj
  })
}

export function confirmObj(obj) {
  return request({
    url: '/stm/swstinputpassengerworkticket/confirm',
    method: 'put',
    data: obj
  })
}

export function send(ids) {
  return request({
    url: '/stm/swstinputpassengerworkticket/send/' + ids,
    method: 'get'
  })
}

export function addTicketHand(ids) {
  return request({
    url: '/stm/swstinputpassengerworkticket/addTicketHand/' + ids,
    method: 'get'
  })
}

export function addRecovery(ids) {
  return request({
    url: '/stm/swstinputpassengerworkticket/addRecovery/' + ids,
    method: 'get'
  })
}

export function saveNonTimely(obj) {
  return request({
    url: '/stm/swstinputpassengerworkticket/saveNonTimely',
    method: 'post',
    data: obj
  })
}

export function saveTimely(obj) {
  return request({
    url: '/stm/swstinputpassengerworkticket/saveTimely',
    method: 'post',
    data: obj
  })
}

export function getPassengerWorkTicket(param) {
  return request({
    url: "/stm/swstinputpassengerworkticket/getPassengerWorkTicket",
    method: "post",
    params: param
  });
}

//根据id去无效票查询对应的数据，已发送的数据或已入库的数据车站不能申请报表差错
export function queryIds(ids) {
  return request({
    url: '/stm/swstinputpassengerworkticket/queryIds',
    method: 'get',
    params:ids
  })
}
//完善票卡信息  ---车站用户
export function completeInfo(obj) {
  return request({
    url: '/stm/swstinputpassengerworkticket/completeInval',
    method: 'put',
    data: obj
  })
}
//纺织城站相关修改状态
export function fangzhichengStatus(obj) {
  return request({
    url: '/stm/swstinputpassengerworkticket/fangzhichengStatus',
    method: 'put',
    data: obj
  })
}
//纺织城和线网查询非即时退换票
export function fetchFangzhichengList(query) {
  return request({
    url: '/stm/swstinputpassengerworkticket/pageLine',
    method: 'get',
    params: query
  })
}
